@charset "utf-8";
@import "variable";

header {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 110;
  height: $header-height;
  padding: 0 0.8rem;
  color: #fff;
  line-height: $header-height;
  background-color: $header-bg;
  /* 左侧 */
  .left {
    i.goback {
      font-size: 0.36rem;
      cursor: pointer;
    }
    #language {
      position: relative;
      display: inline-block;
      height: 100%;
      padding: 0 0.50rem;
      font-size: 0.36rem;

      ul {
        position: absolute;
        padding: 0 0.5rem 0.3rem;
        top: 80%;
        left: 0;
        display: none;
        line-height: 0.68rem;
        border-radius: 0.1rem;
        background: $header-bg;

        a {
          color: #fff;
          cursor: pointer;
          white-space: nowrap;
        }
        a:hover {
          color: $header-active-color;
        }
      }
    }
    #language:hover {
      ul {
        display: block;
      }
    }
  }
  /* 中间 */
  .center {
    ul {
      li {
        float: left;
        text-align: center;
        padding: 0 0.6rem;
        a {
          color: #fff;
          font-size: 0.32rem;
          cursor: pointer;

          img {
            vertical-align: middle;
          }
        }
        a:hover {
          color: #2bbff1;
        }
      }
      li.on {
        font-weight: bold;
        font-size: 0.36rem;
        color: $header-active-color;
        line-height: $header-height - 0.2rem;
        border-top: 0.08rem solid $header-active-color;
        a {
          color: $header-active-color;
          font-size: 0.36rem;
          font-weight: bold;
        }
        a:hover {
          color: #2bbff1;
        }
      }
    }
  }
  /* 右侧 */
  .right {
    .time-hospital {
      max-width: 8rem;
      font-size: 0.36rem;
      line-height: 0.4rem;
      text-align: right;
      .time {
        margin-top: 0.36rem;
        font-weight: bold;
      }
      .hospital {
        position: relative;
        padding-right: 15px;
        font-size: 0.3rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        .clear-hospital {
          position: absolute;
          top: 0;
          right: 0;
          font-weight: bold;
          cursor: pointer;
        }
      }
    }
  }

  #search-container {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10;
    height: 100%;
    line-height: 1.2rem;
    overflow: auto;
    opacity: 0;
    background-color: $main-body-bg;
    border: 1px solid #000;

    table {
      margin: 0.8rem;

      th, td {
        white-space: nowrap;
      }
      thead {
        margin-bottom: 0.4rem;

        th {
          font-size: 0.4rem;
          font-weight: bold;
          letter-spacing: 0.08rem;

          button {
            font: 0.24rem/0.32rem '';
            height: 0.44rem;
            background: $input-bg;
            border-radius: 0.08rem;
            outline: 0;
            border: 0;
            color: #fff;
            cursor: pointer;
          }
        }
      }
      tbody {
        input.input {
          color: #eee;
          height: 0.72rem;
          line-height: 0.72rem;
          width: 1.96rem;
          border: none;
          border-radius: 0.16rem;
          outline: none;
          background: $input-bg;
          text-align: center;
        }
        .input.error {
          border: 1px solid #f00;
        }
        button.button {
          display: block;
          width: 4.0rem;
          margin: 0.4rem auto;
          background: $input-bg;
          border-radius: 0.16rem;
          height: 0.72rem;
          line-height: 0.72rem;
          outline: none;
          border: none;
          color: #eee;
          cursor: pointer;
          letter-spacing: 0.2em;
          padding-left: 0.2em;
        }
        label {
          margin: 0 0.1rem;
        }
      }
    }

    /* 覆盖select2样式 */
  }
  #search-container::-webkit-scrollbar {
    height: 0;
    width: 0;
  }
}

/* select样式修改 */
.select2-container {
  line-height: 0.6rem;
  .selection {
    /* 多选框样式 */
    .select2-selection {
      border: none;
      background-color: #112541;

      ul.select2-selection__rendered {
        position: relative;
        max-height: 3rem;
        overflow: auto;

        .select2-selection__clear {
          position: absolute;
          top: 50%;
          right: 0;
          transform: translate(0, -15px);
        }
        li.select2-selection__choice {
          background-color: transparent;
          border-color: #fff;
        }
        .select2-search.select2-search--inline {
          input {
            color:#fff;
          }
        }
      }::-webkit-scrollbar {
        width: 0;
        height: 0;
      }
    }
    /* 单选框 */
    .select2-selection--single {
      height: 0.76rem;
      .select2-selection__rendered {
        line-height: 0.76rem;
        color: #fff;
      }
      .select2-selection__arrow {
        top: 50%;
        margin-top: -13px;
      }
    }
  }
  /* 下拉样式 */
  .select2-dropdown {
    border: none;

    .select2-search {
      background-color: #112541;
      input.select2-search__field {
        color:#fff;
        background-color: #373945;
      }
    }
    .select2-results {
      line-height: 0.4rem;
      background-color: #112541;

      .select2-results__option[aria-selected=true] {
        background-color: #5897fb;
      }
      .select2-results__option .select2-results__option {
        padding-left: 2.2em;
      }
    }
  }
}